﻿using Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Controller
{
    public class UserController
    {

       // public UserBussiness Controller = new UserBussiness();
        public TblUser objUser = new TblUser();

        public bool AddData()
        {
              UserBussiness Controller = new UserBussiness();
              if (true)
              {
                  Controller.AddData(objUser);
                  return true;
              }
              return false;
               
        }

        public bool DeleteData(int k)
        {
              UserBussiness Controller = new UserBussiness();
            return Controller.DeleteData(k);
        }

        public void UpdateData()
        {
              UserBussiness Controller = new UserBussiness();
            Controller.UpdateData(objUser);
        }

        public List<TblUser> GetAllData()
        {
              UserBussiness Controller = new UserBussiness();
            return Controller.GetAll();
        }

        public TblUser GetDataByID(int k)
        {
              UserBussiness Controller = new UserBussiness();
            return Controller.GetDataByKey(k);
        }

        public List<TblUser> GetAllDataByPositions(int k)
        {
            UserBussiness Controller = new UserBussiness();
            return Controller.GetAllDataByPosition(k);

        }
    }
}
